package com.cjm.mybatis.test4;

import com.cjm.mybatis.MybatisUtil.MybatisUtils;
import com.cjm.mybatis.bean.Order;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.junit.Test;

/**
 * Created by jiaming.chen1 on 2015/7/8.
 */
public class Test4 {
    @Test
    public void getOrder() {
        SqlSessionFactory factory = MybatisUtils.getFactory();
        SqlSession session = factory.openSession();
        String statement = "com.cjm.mybatis.test4.orderMapper.getOrder";
        Order order = session.selectOne(statement, 1);
        session.commit();
        System.out.println(order);
    }
}
